home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_uppernavenosee.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  94 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SHS_UpperNaveNoSee.cog   Isolate Upper Nave sectors for framerate.
  4. #
  5. # [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8.  
  9. symbols
  10.     
  11.     message    startup
  12.     message crossed
  13.     
  14.        surface FromBigNaveOn        linkid=1        
  15.     surface ToBigNaveOff        linkid=2
  16.     surface    Window3                 # makes it look dark from outside
  17.     surface    Window4                # these are the windows that can shot
  18.     surface    Window5
  19.  
  20.  
  21.     sector  WindowSec0
  22.     sector  WindowSec1
  23.     sector  WindowSec2
  24.     sector  WindowSec3
  25.     sector  WindowSec4
  26.     sector  WindowSec5
  27.         
  28.     int     player        local
  29.  
  30.     
  31. end
  32.  
  33. code
  34.  
  35. startup:
  36.     
  37.     player=GetLocalPlayerThing();
  38.     SetSectorAdjoins(WindowSec0, 0);
  39.     SetSectorAdjoins(WindowSec1, 0);
  40.     SetSectorAdjoins(WindowSec2, 0);
  41.     SetSectorAdjoins(WindowSec3, 0);
  42.     SetSectorAdjoins(WindowSec4, 0);
  43.     SetSectorAdjoins(WindowSec5, 0);
  44.     return;
  45.  
  46. crossed:
  47.     
  48.  
  49.     # make sure Indy player is sending message
  50.     If (GetSourceRef() != player) return;
  51.  
  52.     # draw sector
  53.     If (GetSenderId() == 1 )
  54.     {
  55.         Print("draw sector");
  56.         SetSectorAdjoins(WindowSec0, 1);
  57.         SetSectorAdjoins(WindowSec1, 1);
  58.         SetSectorAdjoins(WindowSec2, 1);
  59.         SetSectorAdjoins(WindowSec3, 1);
  60.         SetSectorAdjoins(WindowSec4, 1);
  61.         SetSectorAdjoins(WindowSec5, 1);
  62.         # Make face clear
  63.         SetFaceGeoMode(Window3, 0);
  64.         SetFaceGeoMode(Window4, 0);
  65.         SetFaceGeoMode(Window5, 0);
  66.     }    
  67.     
  68.     # don't draw sector 
  69.     If ((GetSenderId() == 2))
  70.     {
  71.         Print("draw off");
  72.         SetSectorAdjoins(WindowSec0, 0);
  73.         SetSectorAdjoins(WindowSec1, 0);
  74.         SetSectorAdjoins(WindowSec2, 0);
  75.         SetSectorAdjoins(WindowSec3, 0);
  76.         SetSectorAdjoins(WindowSec4, 0);
  77.         SetSectorAdjoins(WindowSec5, 0);
  78.         # Make window dark from outside
  79.         SetFaceGeoMode(Window3,    4);
  80.         SetFaceGeoMode(Window4, 4);
  81.         SetFaceGeoMode(Window5, 4);
  82.     
  83.     }
  84.     return;
  85.     
  86.  
  87.  
  88. end
  89.  
  90.     
  91.  
  92.  
  93.